package System
{
	public class Guid
	{		
		public static function NewGuid():String
		{
			//This is not a real guid generation algorithm.  This just generates 16 random bytes, which will work for some uses.
			var ret:String = "";
			
			for(var i:int = 0 ; i < 16;i++)
			{
				var byte:String = (Math.random() * 256).toString(16);
				
				if (byte.length == 1)
					ret += "0";
				ret += byte;
			}
			
			if (ret.length != 32)
				throw new Error();
			return ret;
		}
	}
}